import React, { useEffect, useState } from 'react'

export default function App1() {
 console.log('---------render---------');
 const [num,setNum]=useState(0)
 useEffect(()=>{
    // window.setInterval(()=>{
    //     console.log('*******定时器***********');
    //     setNum(num+1)
    // },1000)
 },[])
  return (
    <div>
        <h1>{num}</h1>
    </div>
  )
}
